package pack0812;

import java.util.Scanner;

public class Work16 {
    //16：<u>有一个长度为N的数组，用户输入一个数，判断这个数在数组中的位置；</u>
    int[] arr = {1,2,3,4,5,6,7,8,9,10};
    Scanner in = new Scanner(System.in);
    int a = in.nextInt();
    //判断位置
    public void pan(){
        for(int i = 0; i<arr.length; i++){
            if(arr[i]== a){
                System.out.println("这个数在数组的第"+(i+1)+"位");
            }
        }
    }

    public static void main(String[] args) {
        Work16 bd = new Work16();
        bd.pan();
    }
}
